<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>黄金利润计算器</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">
        <h1>黄金利润计算器</h1>
        <label>本金（元）：<input type="number" id="capital" value="1000000"></label><br>
        <label>买入价（元/克）：<input type="number" id="buyPrice" value="858"></label><br>
        <label>卖出价（元/克）：<input type="number" id="sellPrice" value="870"></label><br>
        <button onclick="calcProfit()">计算利润</button>
        <h2 id="result"></h2>
    </div>
    <script src="script.js"></script>
</body>
</html>